<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>维修申请</title>
</head>
<body>
<script type="text/javascript">

function saveEquipRepair(){
	$("#form_add_repair").form({
		onSubmit: function(param){
			var isValid = $(this).form('validate');
			if (!isValid){
				$.messager.progress('close');	// 如果表单是无效的则隐藏进度条
			}
			return isValid;	// 返回false终止表单提交	
		},
		success: function(v){
			var json = eval("(" + v + ")");
			$.messager.alert("操作提示", 
					json.success ? "操作成功" 
					: ("操作失败，原因为：" + json.reason));
			$("#form_add_repair").form("clear");
		}
	});
	$("#form_add_repair").submit();
	
}
</script>
	<div class="easyui-panel" title="录入维修申请" 
		border="false" fit="true" >
		<form  id="form_add_repair" action="add_repair" method="post">
			<table width="100%" border="0" style="padding:6px;margin-left:60px;">
				<tr>	
					<td width="30%"> 
						<input name="repaiName" style="width:200px;" class="easyui-textbox" label="申请人" 
						data-options="required:true,validType:'isBlank'"> 
					</td>
					<td width="35%">
						<select name="repaiDept" style="width:200px;" class="easyui-combotree" label="申请科室" 
						data-options="url:'to_QueryAllOffice',panelHeight: 'auto',required:true,validType:'isBlank'">
								
						</select>
						</td>			
				</tr>
				<tr>
					<td width="30%"> 
						<input name="repaiTitle" style="width:300px;" class="easyui-textbox" label="申请标题"
						data-options="required:true,validType:'isBlank'"> 
					</td>
					<td width="35%">
						<input name="repaiDate" style="width:250px;" class="easyui-datebox" label="申请日期"
						data-options="required:true,validType:'isBlank'">
					</td>	
				</tr>
				<tr>
					<td width="40%"> 
						<input name="repaiQuestion" style="width:80%;" class="easyui-textbox" label="问题描述"
						data-options="required:true,validType:'isBlank',multiline:true,height:100"> 
					</td>
					
				</tr>
			</table>
			<div style="margin: 5px 3px;margin-left:60px;">
				<a href="#" class="easyui-linkbutton" 
				data-options="onClick:saveEquipRepair" iconCls="icon-save">保存维修申请</a>
			</div>
		</form>	
	</div>
</body>
</html>